Skip to content

test(rng): prove the RC23 entropy audit budget - #207

Merged
BitHighlander merged 1 commit into
reconcile/upstream-syncfrom
agent/rc23-entropy-c27
Aug 3, 2026
Merged

test(rng): prove the RC23 entropy audit budget#207
BitHighlander merged 1 commit into
reconcile/upstream-syncfrom
agent/rc23-entropy-c27

Conversation

@BitHighlander

Copy link
Copy Markdown
Contributor

Summary

Add the canonical Python/PDF evidence for the RC23 GetEntropy policy:

  • prove a fresh initialized, PIN-protected, locked device still requires confirmation;
  • prove an uninitialized device receives exactly 8 x 8192 bytes = 64 KiB without confirmation;
  • check exact response lengths, block uniqueness, byte diversity, dominant-symbol bounds, and a broad monobit bound;
  • prove the next request restores ButtonRequest confirmation;
  • keep the protection-level test meaningful by clearing the session before its confirmation assertion;
  • update C27 to describe the exact evidence and explicitly avoid claiming statistical certification.

CI contract

The new C27 case is gated by KK_EXPECT_ENTROPY_BUDGET=1. Upstream Python CI uses the published emulator and skips the unreleased firmware policy. The repaired firmware PR sets the marker against its exact-head emulator, where C27 is mandatory and PDF catalog validation must pass.

Base and scope

Targets reconcile/upstream-sync@9c58e677135e24e59b5d867348073d47dae61785, immediately after the canonical Taproot staging merges #204 and #206. Test/report only; no protocol or package publication change.

Local validation:

  • git diff --check
  • python3 -m py_compile tests/test_msg_getentropy.py tests/test_protection_levels.py scripts/generate-test-report.py
  • targeted pytest collection with the repository's pure-Python protobuf compatibility mode

@BitHighlander
BitHighlander merged commit 7e35103 into reconcile/upstream-sync Aug 3, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant